package all

// Director 主管
type Director struct {
	Builder IBuilder
}

func NewBuildDirector(builder IBuilder) *Director {
	return &Director{
		Builder: builder,
	}
}

func (d *Director) SetBuilder(builder IBuilder) {
	d.Builder = builder
}

func (d *Director) Direct() House {
	d.Builder.Window()
	d.Builder.Door()
	d.Builder.Floor()
	d.Builder.Floors()
	return d.Builder.House()
}
